import request from '@/utils/request'

export function queryThemeTravelByTheme(themeId, pageNum = 1) {
  return request({
    url: `travel/theme/${themeId}/page/${pageNum}`,
    method: 'get'
  })
}

export function updateTravel(data) {
  return request({
    url: 'travel',
    method: 'put',
    data
  })
}

export function addTravel(data) {
  return request({
    url: 'travel',
    method: 'post',
    data
  })
}

export function queryAllTheme() {
  return request({
    url: 'travel/theme',
    method: 'get'
  })
}

export function queryAllActivity() {
  return request({
    url: 'travel/activity',
    method: 'get'
  })
}

export function queryAllWay() {
  return request({
    url: 'travel/way',
    method: 'get'
  })
}
